Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add bytes to string modifier for solana contracts #1040

Merged
merged 8 commits into from
Feb 24, 2025

Conversation

EasterTheBunny
Copy link
Collaborator

@EasterTheBunny EasterTheBunny commented Feb 19, 2025

@EasterTheBunny EasterTheBunny force-pushed the NONEVM-1064/chainreader-interface-tests-solana branch from c55d6ad to 5773256 Compare February 20, 2025 16:08
@EasterTheBunny EasterTheBunny force-pushed the NONEVM-1064/chainreader-interface-tests-solana branch from 5773256 to 995ae85 Compare February 20, 2025 16:13
@EasterTheBunny EasterTheBunny marked this pull request as ready for review February 21, 2025 14:57
@EasterTheBunny EasterTheBunny requested review from nolag and a team as code owners February 21, 2025 14:57
case reflect.Array, reflect.Slice:
return fmt.Errorf("%w: cannot set a field from an array or slice", types.ErrInvalidType)
case reflect.Struct:
case reflect.Map:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Glad to see this added! Should we add map support to the other helpers as well?

  • SetValueFromPath
  • ApplyValue
  • RetypeToOffChain

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. I exported the helpers and added map support to both

// call RetypeToOffChain first with empty itemType to set base types
offChainType, _ := mod.RetypeToOffChain(reflect.TypeOf(&onChain{}), "")

fmt.Println("offChainType:")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This stays?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is part of the example and should stay, yes.

@reductionista reductionista merged commit dc2073f into main Feb 24, 2025
14 of 15 checks passed
@reductionista reductionista deleted the NONEVM-1064/chainreader-interface-tests-solana branch February 24, 2025 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants